package com.hdax.dm.mapstrucs;

import com.hdax.dm.dto.UserDto;
import com.hdax.dm.entity.user.DmUser;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public abstract class UserDtoMapper {

    @Mappings({
            @Mapping(source = "hobby",target = "interest")
    })
    public abstract UserDto toTarget(DmUser user);

    public abstract List<UserDto> toTargets(List<DmUser> user);
}
